# class Solution:
#     def sumNums(self, n: int) -> int:
#         return (1+n)*n//2


class Solution:
    def sumNums(self, n: int) -> int:
        return n and (n + self.sumNums(n-1))
        
s=Solution()
s.sumNums(5)